package com.chb.exception;

import org.springframework.web.bind.annotation.ControllerAdvice;
import org.springframework.web.bind.annotation.ExceptionHandler;

/**
 * @author: 陈海彬
 * @date: Created in 2023/10/11 16:59
 * @description: 全局异常处理器
 * @modified By:
 * @version: 1.0
 */

//@ControllerAdvice
public class MyExceptionHandel {
    @ExceptionHandler(value = Exception.class)
    public String error(Exception e) {
        System.out.println("出现异常" + e.getMessage());
        return "error";
    }
}